package com.example.web.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import com.example.web.service.UserService;
import com.example.web.tool.R;

@RestController
public class UserController {

	@Autowired
	UserService userService;
	
	@GetMapping("/page1/{pageNum}/{pageSize}")
	public R page1(@PathVariable int pageNum, @PathVariable int pageSize) {
		return R.ok().put("data", userService.getList1(pageNum, pageSize));
	}
	
	@GetMapping("/page2/{pageNum}/{pageSize}")
	public R page2(@PathVariable int pageNum, @PathVariable int pageSize) {
		return R.ok().put("data", userService.getList2(pageNum, pageSize));
	}
	
	
	
}
